﻿using System.ComponentModel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Devonline.Identity.Admin.Controllers;

[SecurityHeaders]
[Description("主页")]
[Authorize(Roles = GROUP_MAINTAINERS)]
[AccessAuthorize(Code = "AS0XHome", ResourceType = ResourceType.Service, Roles = GROUP_MAINTAINERS)]
public class HomeController : Controller
{
    /// <summary>
    /// 主页
    /// </summary>
    /// <returns></returns>
    [AccessAuthorize(Code = "AS0P00Index", ResourceType = ResourceType.Page), DisplayName("首页")]
    public IActionResult Index()
    {
        return View();
    }
    /// <summary>
    /// Shows the error page
    /// </summary>
    [AllowAnonymous]
    [AccessAuthorize(Code = "AS0PError", ResourceType = ResourceType.Page), DisplayName("错误页面")]
    public IActionResult Error(string errorId)
    {
        return View();
    }
}